//
// Created by baigui on 2021/10/19.
//

#ifndef SIMPLE_PLAYER_COMMON_H
#define SIMPLE_PLAYER_COMMON_H

#define SP_SUCCESS        (-0) /**< No error */
#define SP_EGENERIC       (-1) /**< Unspecified error */
#define SP_ENOMEM         (-2) /**< Not enough memory */
#define SP_ETIMEOUT       (-3) /**< Timeout */
#define SP_ENOMOD         (-4) /**< Module not found */
#define SP_ENOOBJ         (-5) /**< Object not found */
#define SP_ENOVAR         (-6) /**< Variable not found */
#define SP_EBADVAR        (-7) /**< Bad variable value */
#define SP_ENOITEM        (-8) /**< Item not found */



#   define SP_FOURCC( a, b, c, d ) \
        ( ((uint32_t)d) | ( ((uint32_t)c) << 8 ) \
           | ( ((uint32_t)b) << 16 ) | ( ((uint32_t)a) << 24 ) )
#   define SP_TWOCC( a, b ) \
        ( (uint16_t)(b) | ( (uint16_t)(a) << 8 ) )

#endif //SIMPLE_PLAYER_COMMON_H
